<?php
header("Content-type: text/html; charset=utf-8");
include_once('fm/comm.php');
$myt = new thunder();

if(isset($_REQUEST)){
	extract($_REQUEST);
}

$sql = "select a.*,b.goods_name from kd_custom_goods_config as a left join ecs_goods as b on a.cid=b.goods_id ";
$data = $myt->getAll($sql);
//var_dump($data);
$str = '';
foreach($data as $d){
	$str .= "<cata>
        <name>".$d['goods_name']."</name>
        <gid>".$d['cid']."</gid>
        </cata>";
}
//$str = rtrim($str, ',');
//$str = "[".$str."]";
$xml = '<root>'.$str.'</root>';


echo $xml;

?>